function ccR_Warrior_3()
	if ccrPlayerLevel() == 90 then Warrior_Protection_90v2() end
end

function Warrior_Protection_90v2()

	if ccrSpellCanAttack("Pummel")
			and ccrTargetIsCastingOrChanneling()
			and ccrTargetIsInteruptable()
			then
				if ccrTargetIsChanneling() then ccrCastAttack(PUMMEL) end
				if ccrTargetIsCasting()
				and ccrTargetHasLeftOnCast(1)
				then
					ccrCastAttack("Pummel")
					return
				end
			end	
	
	AcceptProposal();
	Gather_Nearby_Players()
	ccrCastBuffIfMissing("Commanding Shout")
	if IsShiftKeyDown() then ccrCast("Heroic Leap") CameraOrSelectOrMoveStart() CameraOrSelectOrMoveStop() return end
	if not ccrStance("Defensive Stance") then ccrCast("Defensive Stance") end
	if ccrPlayerIsInCombat() then
-- Taunts

	if ccrUnitHasDebuff("targettarget", "Corrosive Blast") then ccrCastAttack("Taunt") return end
	if ccrUnitHasDebuffStacks("targettarget", "Self Doubt", 3) then ccrCastAttack("Taunt") return end
	if ccrUnitHasDebuffStacks("targettarget", "Ignite Armor", 3) then ccrCastAttack("Taunt") return end
-- Survival
	if SpellIsReady("Demoralizing Shout") and ccrTargetIsBoss() then ccrCast("Demoralizing Shout") return else
	if SpellIsReady("Demoralizing Shout") and #tblPGetMeleeEnemies > 5 then ccrCast("Demoralizing Shout") return end end
	if ccrPlayerHealth() <= 20 and SpellIsReady("Last Stand") then ccrCast("Last Stand") return end
	if SpellIsReady("Enraged Regeneration") then ccrCast("Enraged Regeneration") return end
	if SpellIsReady("Shield Barrier") and #tblPGetMeleeEnemies > 4 and ccrPlayerRage() >= 90 then ccrCast("Shield Barrier") return end
	
-- CD's
	if SpellIsReady("Berserker Rage") then ccrCast("Berserker Rage") return end
	if SpellIsReady("Recklessness") and ccrTargetIsBoss() then ccrCast("Recklessness") return end
	if SpellIsReady("Skull Banner") and (ccrPlayerHasBuff("Bloodlust") or ccrPlayerHasBuff("Timewarp")or ccrPlayerHasDebuff("Sated")) then ccrCast("Skull Banner") return end
	if SpellIsReady("Bloodbath") then ccrCast("Bloodbath") return end
	if SpellIsReady("Dragon Roar") and ccrTargetIsWithinMeleeRange() then ccrCastAttack("Dragon Roar") return end
	
-- AOE
		if #tblPGetMeleeEnemies > 4
			and SpellIsReady("Thunder Clap")
				then
				ccrCastAttack("Thunder Clap")
				return
		else
-- Rotation
			if ccrPlayerHasBuff("Ultimatum") and #tblPGetMeleeEnemies > 2
				then
				ccrCastAttack("Cleave")
				return
			else
				if ccrPlayerHasBuff("Ultimatum")
					then
					ccrCastAttack("Heroic Strike")
					return
				else 
					if SpellIsReady("Shield Barrier") and not ccrPlayerHasBuff("Shield Barrier")
						and ccrPlayerRage() >= 70
							then
							ccrCast("Shield Barrier")
							return
					else
						if ccrTargetHealth() <= 20
							and SpellIsReady("Execute")
							and ccrPlayerRage() >= 90
								then
								ccrCastAttack("Execute")
								return
							else
							if ccrPlayerRage() >= 90
								then
								ccrCastAttack("Heroic Strike")
								return
							else
								if #tblPGetMeleeEnemies > 2 and ccrPlayerRage() >= 90
									then
									ccrCastAttack("Cleave")
									return
								else
									if SpellIsReady("Shield Slam")
										then
										ccrCastAttack("Shield Slam")
										return
									else
										if SpellIsReady("Revenge")
											then
											ccrCastAttack("Revenge")
											return
										else
											if not ccrTargetHasDebuff("Weakened Blows")
												then
												ccrCastAttack("Thunder Clap")
												return
											else
												if ccrPlayerRage() <= 60
													and SpellIsReady("Commanding Shout")
													then
													ccrCast("Commanding Shout")
													return
												else
													if SpellIsReady("Devastate")
														then
														ccrCastAttack("Devastate")
														return
													end	
												end
											end	
										end	
									end
								end	
							end
						end
					end
				end
			end
		end
	end	
end	